package com.bigger.handle;

import com.bigger.exception.BaseException;
import com.bigger.result.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {
    @ExceptionHandler
    public Result<String> exceptionHandler(BaseException e){
        return Result.error(e.getMessage());
    }
}
